import React from 'react';
import {getTodosCount} from '@utils/funs';

export default class ReportBar extends React.Component {

  report = () => {
    alert(`共计 ${getTodosCount()} 条`);
  };

  render() {

    console.log(`render <${this.constructor.name}/> once`);

    return (
        <div className="counter">
          <button onClick={this.report}>报告</button>
        </div>
    );
  }

}
